package com.buba.controller;


import com.buba.pojo.other.LeftTree;
import com.buba.service.LgRoleAuthorityService;
import com.guli.common.ov.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author MrJia
 * @since 2020-10-27
 */
@RestController
@RequestMapping("/lgRoleAuthority")
public class LgRoleAuthorityController {

    @Autowired
    private LgRoleAuthorityService lgRoleAuthorityService;

    @GetMapping("/leftList/{roleId}")
    public R initLeftTree(@PathVariable("roleId") String roleId) {
        return R.ok().data("tree", lgRoleAuthorityService.selectListByRoleId(roleId));
    }

}

